import { NgModule, ErrorHandler } from '@angular/core';
import { BrowserModule }      from '@angular/platform-browser';
import { IonicApp, IonicModule, IonicErrorHandler } from 'ionic-angular';
import { MyApp }              from './app.component';

import { StatusBar }          from '@ionic-native/status-bar';
import { SplashScreen }       from '@ionic-native/splash-screen';
import { JPush }              from '@jiguang-ionic/jpush';
import { Components }         from './modules';
// import { LoginPage } from '../pages/login/login';
// 

import { CONFIG }             from '../tools/serivce/config/config';
import { AjaxService }        from "../tools/serivce/ajax/ajax.service";
import { TokenService }        from "../tools/serivce/token/token.service";

import { HttpModule  }        from '@angular/http';




@NgModule({
  declarations: [
    MyApp,
    // LoginPage,
    ...Components,
  ],
  imports: [
    BrowserModule,
    HttpModule,
    IonicModule.forRoot(MyApp)
  ],
  bootstrap: [IonicApp],
  entryComponents: [
    MyApp,
    // LoginPage,
    ...Components,
  ],
  providers: [
    JPush,
    StatusBar,
    SplashScreen,
    {provide: ErrorHandler, useClass: IonicErrorHandler},
    AjaxService,
    TokenService,
    CONFIG
  ]
})
export class AppModule {}
